<div >
	<table class="album">
		<tr>
	<?php 
		
		$pageAlbum=$this->listeralbum['pageAlbum'];
		
		if(!empty($this->listeralbum['photoAff'] ))
		{ ?>
		
			<td>
				<div class="middle float_right">
					<table >
					
						<tr>
							<td>
								<p><?php echo $this->listeralbum['photoAff']['VIP'] ;?></p>
							</td>
						</tr>
						<tr>
							<td>
								<img class="center" alt="image vip" src="/images/photos/<?php echo $this->listeralbum['photoAff']['ADRESSE'];?>" width="240" height="320" />
							</td>
						</tr>
						<tr>
							<td>
							<fieldset>
								<legend>Commentaire</legend>
								<p><?php echo $this->listeralbum['photoAff']['COMMENTAIRE'];?></p>
							</fieldset>
							</td>
						</tr>
					</table>
				</div>
			</td>
		
		
	<?php
			
		}
	?>
		
			<td>
				<div class="float_right" >
					<table class="lister_photo">
						<tr>
					<?php 	
						$i=0;
						foreach($this->listeralbum['photos'] as $unePhoto)
						{ 
							if($i%3==0 && $i!=0)
							{
								echo "</tr><tr>";
							}
							?>
							<td>
								<a	href="<?php 
								echo $this->url(array('controller'=>'Album',
																	'action'=>'listeralbum',
																	'pageAlbum'=>$pageAlbum,
																	'numPhoto' =>$unePhoto->PHOTO_NUMERO,
																	'vipNum' =>$unePhoto->VIP_NUMERO));	?>">
								<?php 								
								echo '<img alt="image vip" src="/images/photos/'.$unePhoto->PHOTO_ADRESSE.'" width="120" height="160" />';
								?>
								</a>
							</td>
					<?php
						$i++;
						} ?>
						</tr>
					</table>
					<p class="center">
							<?php 	
							echo '<a href="';
							echo $this->url(array('pageAlbum'=>1)).'">';
							echo 'Debut'; 
							echo '</a>';
							?>
							
							&nbsp;&nbsp;&nbsp;
					
							<?php				
							if($pageAlbum+1<=$this->listeralbum['pages'])
							{
								echo '<a href="';
								echo $this->url(array('pageAlbum'=>$pageAlbum+1)).'">';
								echo 'Suivant'; 
								echo '</a>';
							}
							?>
							
							&nbsp;&nbsp;&nbsp;
							
							<?php 				
							for($i=1;$i<=$this->listeralbum['pages'];$i++)
							{
								echo '<a href="';
								echo $this->url(array('pageAlbum'=>$i)).'">';
								echo $i; 
								echo '</a>';
								echo '&nbsp;';
							}
							?>
							
							&nbsp;&nbsp;&nbsp;
							
							<?php 				
							if($pageAlbum-1>=1)
							{
								echo '<a href="';
								echo $this->url(array('pageAlbum'=>$pageAlbum-1)).'">';
								echo 'Precedent'; 
								echo '</a>';
							}
							?>
							
							&nbsp;&nbsp;&nbsp;
							
							<?php 				
							echo '<a href="';
							echo $this->url(array('pageAlbum'=>$this->listeralbum['pages'])).'">';
							echo 'Fin'; 
							echo '</a>';
							?>
					
					</p>
				</div>
			</td>
		</tr>
	</table>
</div>
